package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author stone
 * @date 2022/11/15 21:13
 */
//@Controller
//@ResponseBody
@RestController
@RequestMapping("json")
public class JsonController {


    @RequestMapping("case1")
    //@ResponseBody
    public String case1() {
        return "hello string";
    }
    @RequestMapping("case2")
    //@ResponseBody
    public BaseRespVo case2() {
        return BaseRespVo.ok("json case2");
    }
}
